package com.xl.core.util;

import java.util.Random;

public class NumberUtil {

	/**
	 * 生成随机的字母大小写+数字的的字符串
	 * 
	 * @param len
	 * @return
	 */
	public static String randomNum(int len) {
		Random random = new Random();
		String merchantnum = "";
		// 随机生成0-9a-zA-Z三位混淆码
		for (int i = 0; i < 6; i++) {
			int e;
			e = random.nextInt(75) + 48;
			if ((e > 57 && e < 65) || (e > 90 && e < 97)) {
				e += 10;
			}
			merchantnum += (char) e;
		}
		return merchantnum;
	}

}
